using System.Collections;
using System.Collections.Generic;
using Entitas;
using Entitas.CodeGeneration.Attributes;
using UnityEngine;
using EventType = Entitas.CodeGeneration.Attributes.EventType;

/// <summary>
/// 游戏面板
/// </summary>
[Game, Unique]
public class GameBoardComponent : IComponent
{
    public int columns;
    public int rows;
}

/// <summary>
/// 游戏界面元素
/// </summary>
[Game]
public class GameBoardItemComponent : IComponent
{
}

/// <summary>
/// 游戏元素消除组件
/// </summary>
[Game, Event(EventTarget.Self)]
public class DestroyComponent : IComponent
{
}

/// <summary>
/// 游戏元素坐标
/// </summary>
[Game, Event(EventTarget.Self, EventType.Added, 1)]
public class ItemIndexComponent : IComponent
{
    [EntityIndex] public CustomVector2 index;
}

/// <summary>
/// 加载预制体组件
/// </summary>
[Game, Event(EventTarget.Any)]
public class LoadPrefabComponent : IComponent
{
    public string path;
}

/// <summary>
/// 元素是否可移动标签
/// </summary>
[Game]
public class MovableComponent : IComponent
{
}

/// <summary>
/// 交换状态标记组件
/// </summary>
[Game]
public class ExchangeComponent : IComponent
{
    public ExchangeState exchangeState;
}

/// <summary>
/// 运动状态标记组件
/// </summary>
[Game]
public class MoveComplete : IComponent
{
}

/// <summary>
/// 获取相同颜色元素的行为标记
/// </summary>
[Game]
public class GetSameColor : IComponent
{
}